import  axios from  'axios'

export default class  Management_anthorityService{
    static management_anthorityService = null

    static getInstance(){
        if(this.management_anthorityService == null){
            this.management_anthorityService = new Management_anthorityService()
        }
        return this.management_anthorityService
    }

    getOne(role_id){
        return axios.get(`http://localhost/roles/getOne/${role_id}`)
    }


    getBigData(){
        return axios.get(`http://localhost/authorities/BigData`)
    }

    getRoleAuthority(role){
        return axios.get(`http://localhost/authorities/role/${role}`)
    }

    UpdateAuthority(a){
        return axios.put(`http://localhost/rolesauthorities/UpdateAuthority`, a)
    }

    addRoleAndanthority(a){
        return axios.post(`http://localhost/rolesauthorities`, a)
    }

    list(){
        return axios.get(`http://localhost/authorities`)
    }

}
